package com.ruoyi.wbgame.service.impl;

import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.wbgame.mapper.WbItemTypeMapper;
import com.ruoyi.wbgame.domain.WbItemType;
import com.ruoyi.wbgame.service.IWbItemTypeService;
import com.ruoyi.common.core.text.Convert;

/**
 * 题型Service业务层处理
 * 
 * @author guguofu
 * @date 2021-04-19
 */
@Service
public class WbItemTypeServiceImpl implements IWbItemTypeService 
{
    @Autowired
    private WbItemTypeMapper wbItemTypeMapper;

    /**
     * 查询题型
     * 
     * @param itemTypeId 题型ID
     * @return 题型
     */
    @Override
    public WbItemType selectWbItemTypeById(Long itemTypeId)
    {
        return wbItemTypeMapper.selectWbItemTypeById(itemTypeId);
    }

    /**
     * 查询题型列表
     * 
     * @param wbItemType 题型
     * @return 题型
     */
    @Override
    public List<WbItemType> selectWbItemTypeList(WbItemType wbItemType)
    {
        return wbItemTypeMapper.selectWbItemTypeList(wbItemType);
    }

    /**
     * 新增题型
     * 
     * @param wbItemType 题型
     * @return 结果
     */
    @Override
    public int insertWbItemType(WbItemType wbItemType)
    {
        return wbItemTypeMapper.insertWbItemType(wbItemType);
    }

    /**
     * 修改题型
     * 
     * @param wbItemType 题型
     * @return 结果
     */
    @Override
    public int updateWbItemType(WbItemType wbItemType)
    {
        return wbItemTypeMapper.updateWbItemType(wbItemType);
    }

    /**
     * 删除题型对象
     * 
     * @param ids 需要删除的数据ID
     * @return 结果
     */
    @Override
    public int deleteWbItemTypeByIds(String ids)
    {
        return wbItemTypeMapper.deleteWbItemTypeByIds(Convert.toStrArray(ids));
    }

    /**
     * 删除题型信息
     * 
     * @param itemTypeId 题型ID
     * @return 结果
     */
    @Override
    public int deleteWbItemTypeById(Long itemTypeId)
    {
        return wbItemTypeMapper.deleteWbItemTypeById(itemTypeId);
    }
}
